﻿using WeDonekRpc.Helper.Validate;

namespace WeDonekRpc.HttpApiGateway.Model
{
    public class EnumParam<T> where T : struct
    {
        /// <summary>
        /// 数据Id
        /// </summary>
        [NumValidate("public.data.id.error", 1)]
        public long Id { get; set; }
        /// <summary>
        /// 参数
        /// </summary>
        [EnumValidate("public.data.value.error", IsContain = true)]
        public T Value { get; set; }
    }
    public class EnumNullParam<T> where T : struct
    {
        /// <summary>
        /// 数据Id
        /// </summary>
        [NumValidate("public.data.id.error", 1)]
        public long Id { get; set; }
        /// <summary>
        /// 参数
        /// </summary>
        public T? Value { get; set; }
    }
}
